package com.yanggu.flink.datastream_api.test

import org.apache.flink.api.common.functions.FlatMapFunction
import org.apache.flink.util.Collector

/**
 * 验证FlatMap函数, 主要是如何模拟收集器Collector
 */
class IncrementFlatMapFunction extends FlatMapFunction[Int, Int] {

  override def flatMap(value: Int, out: Collector[Int]): Unit = {
    out.collect(value + 1)
  }

}
